<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>站点配置</title>
  <link rel="stylesheet" href="../../../admin/css/system/site.css" media="all">
  </link>
</head>

<body>
  <div class="layui-tab layui-tab-brief">
    <ul class="layui-tab-title pl50">
      <li class="layui-this">网站配置</li>
      <li>上传配置</li>
      <li>邮件配置</li>
      <li>SMS配置</li>
      <li>认证配置</li>
      <li>战队配置</li>
      <li>维护配置</li>
    </ul>
    <div class="layui-tab-content">
      <div class="layui-tab-item p50 layui-show">
        <!--网站配置-->
        <form class="layui-form" action="">
          <div class="layui-form-item">
            <label class="layui-form-label w120 tr red-star">网站标题</label>
            <div class="layui-input-block">
              <input type="text" name="username" lay-verify="required" placeholder="请输入网站标题" autocomplete="off"
                class="layui-input w700">
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label w120 tr red-star">网站关键词</label>
            <div class="layui-input-block">
              <input type="text" name="username" lay-verify="required" placeholder="请输入网站关键词" autocomplete="off"
                class="layui-input w700">
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label w120 tr red-star">网站描述</label>
            <div class="layui-input-block">
              <textarea name="username" rows="5" lay-verify="required" placeholder="请输入网站描述" autocomplete="off"
                class="layui-input w700 h100 p10"></textarea>
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label w120 tr red-star">网站logo</label>
            <div class="layui-input-block">
              <button type="button" class="layui-btn layui-btn-normal" id="ID-upload-demo-action">
                <i class="layui-icon layui-icon-upload"></i>
                上传图片
              </button>
              <button type="button" class="layui-btn layui-btn-primary" id="ID-upload-site" style="color:#fff !important">
                <i class="layui-icon layui-icon-picture"></i>
                图库选择
              </button>
              <div class="layui-inline layui-word-aux">
                请上传png、jpg格式文件，大小不超过2M
              </div>
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label w120 tr red-star">备案信息</label>
            <div class="layui-input-block">
              <input type="text" name="username" lay-verify="required" placeholder="请输入备案信息" autocomplete="off"
                class="layui-input w700">
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label w120 tr red-star">版本信息</label>
            <div class="layui-input-block">
              <textarea name="username" rows="5" lay-verify="required" placeholder="请输入版本信息" autocomplete="off"
                class="layui-input w700 h100 p10"></textarea>
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label w120 tr"></label>
            <div class="layui-input-block">
              <button type="submit" class="layui-btn layui-bg-blue" lay-submit lay-filter="demo1">修改配置</button>
            </div>
          </div>
        </form>
      </div>
      <div class="layui-tab-item p50">
        <!--上传配置-->
        <form class="layui-form" action="">
          <div class="layui-form-item">
            <label class="layui-form-label w120 tr red-star">存储方式</label>
            <div class="layui-input-block">
              <input type="radio" name="AAA" value="1" title="本地存储">
              <input type="radio" name="AAA" value="2" title="阿里云OSS" checked> 
              <input type="radio" name="AAA" value="3" title="腾讯云COS"> 
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label w120 tr red-star">允许大小</label>
            <div class="layui-input-block flex">
              <input type="number" name="AAA" value="" title="本地存储" class="layui-input w200">
              <span class="ml20 cgrey fs14">KB 允许上传的附件大小</span>
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label w120 tr red-star">允许类型</label>
            <div class="layui-input-block">
              <input type="number" name="AAA" value="" title="本地存储" class="layui-input w700">
              <div class="red-star mt10">允许上传的文件类型</div>
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label w120 tr"></label>
            <div class="layui-input-block">
              <button type="submit" class="layui-btn layui-bg-blue" lay-submit lay-filter="demo1">修改配置</button>
            </div>
          </div>
        </form>
      </div>
      <div class="layui-tab-item p50">
        <!--邮件配置-->
        <form class="layui-form" action="">
          <div class="layui-form-item">
            <label class="layui-form-label w120 tr red-star">发送地址</label>
            <div class="layui-input-block">
              <input type="text" name="username" lay-verify="required" placeholder="请输入发信STMP服务器" autocomplete="off"
                class="layui-input w700">
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label w120 tr red-star">发信端口</label>
            <div class="layui-input-block">
              <input type="number" name="username" lay-verify="required" placeholder="请输入服务器端口" autocomplete="off"
                class="layui-input w700">
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label w120 tr red-star">发信账号</label>
            <div class="layui-input-block">
              <input type="text" name="username" lay-verify="required" placeholder="请输入发信邮箱账号" autocomplete="off"
                class="layui-input w700">
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label w120 tr red-star">发信密码</label>
            <div class="layui-input-block">
              <input type="text" name="username" lay-verify="required" placeholder="请输入发信邮箱密码" autocomplete="off"
                class="layui-input w700">
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label w120 tr"></label>
            <div class="layui-input-block">
              <button type="submit" class="layui-btn layui-bg-blue" lay-submit lay-filter="demo1">修改配置</button>
              <button type="submit" class="layui-btn layui-btn-primary layui-border-blue" lay-submit lay-filter="demo1" style="color: rgb(30, 159, 255) !important">测试发信</button>
            </div>
          </div>
        </form>
        <div class="box_22 flex-col">
          <div class="box_23 flex-row justify-between">
            <img
              class="thumbnail_9"
              referrerpolicy="no-referrer"
              src="https://lanhu-oss.lanhuapp.com/SketchPngbc1f72f6083b6d8928b6f0cc0eb728f3cc6f8c56bc36ad42dcd3b27bab2de871"
            />
            <span class="text_36">配置须知</span>
          </div>
          <span class="paragraph_1"
            >1.关于自定义&nbsp;验证码类型&nbsp;模板，请在程序同级目录创建[extend/template/mail_verify_code.tpl]文件，并添加自定义模板内容;<br />2.验证码类型模板关键词替换:&nbsp;验证码-&gt;&#123;&#123;CODE}}，应用名-&gt;&#123;&#123;APPNAME}}，用户名-&gt;&#123;&#123;NAME}}，有效期-&gt;&#123;&#123;VALIDTIME}}，手机号-&gt;&#123;&#123;PHONE}}；</span
          >
        </div>
      </div>
      <div class="layui-tab-item p50">
        <!--SMS配置-->
        <form class="layui-form" action="">
          <div class="layui-form-item">
            <label class="layui-form-label w120 tr red-star">SMS类型</label>
            <div class="layui-input-block">
              <input type="radio" name="AAA" value="1" title="短信宝">
              <input type="radio" name="AAA" value="2" title="互亿无线" checked> 
              <input type="radio" name="AAA" value="3" title="其他服务商"> 
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label w120 tr"></label>
            <div class="layui-input-block">
              <button type="submit" class="layui-btn layui-bg-blue" lay-submit lay-filter="demo1">修改配置</button>
            </div>
          </div>
        </form>
        <div class="box_22 flex-col">
          <div class="box_23 flex-row justify-between">
            <img
              class="thumbnail_9"
              referrerpolicy="no-referrer"
              src="https://lanhu-oss.lanhuapp.com/SketchPngbc1f72f6083b6d8928b6f0cc0eb728f3cc6f8c56bc36ad42dcd3b27bab2de871"
            />
            <span class="text_36">配置须知</span>
          </div>
          <span class="paragraph_1"
            >1.关于自定义&nbsp;验证码类型&nbsp;模板，请在程序同级目录创建[extend/template/sms_verify_code.tpl]文件，并添加自定义模板内容;<br />2.验证码类型模板关键词替换:&nbsp;验证码-&gt;&#123;&#123;CODE}}，应用名-&gt;&#123;&#123;APPNAME}}，用户名-&gt;&#123;&#123;NAME}}，有效期-&gt;&#123;&#123;VALIDTIME}}，手机号-&gt;&#123;&#123;PHONE}}；<br />3.验证码类型默认模板: 您的验证码是：{{CODE}}。请不要把验证码泄露给其他人。；<br />4.系统默认支持2个服务商：<a href="https://www.smsbao.com/" style="color: #1E9FFF" target="_blank">短信宝</a> 和 <a href="https://www.ihuyi.com/" style="color: #1E9FFF" target="_blank">互亿无线</a>，其他服务商可通过自定义发信配置；</span
          >
        </div>
      </div>
      <div class="layui-tab-item p50">
        <!--认证配置-->
        <form class="layui-form" action="">
          <div class="layui-form-item">
            <label class="layui-form-label w120 tr red-star">登录功能</label>
            <div class="layui-input-block">
              <input type="radio" name="AAA3" value="1" title="允许">
              <input type="radio" name="AAA3" value="2" title="禁止" checked>
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label w120 tr red-star">会话限制</label>
            <div class="layui-input-block">
              <input type="radio" name="AAA2" value="1" title="单一会话">
              <input type="radio" name="AAA2" value="2" title="多个会话" checked>
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label w120 tr red-star">失败封禁</label>
            <div class="layui-input-block">
              <input type="radio" name="AAA4" value="1" title="开启封禁">
              <input type="radio" name="AAA4" value="2" title="关闭封禁" checked>
            </div>
            <div class="red-star cgrey">登录失败次数达到阈值 则封禁账号</div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label w120 tr red-star">封禁阙值</label>
            <div class="layui-input-block flex">
              <input type="number" name="AAA" value="" class="layui-input w200">
              <span class="ml20 cgrey fs14">次 失败次数触发封禁指令</span>
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label w120 tr red-star">封禁时长</label>
            <div class="layui-input-block flex">
              <input type="number" name="AAA" value="" class="layui-input w200">
              <span class="ml20 cgrey fs14">分钟 若为“0” 则代表直接封禁账号，其他则为时间</span>
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label w120 tr red-star">注册功能</label>
            <div class="layui-input-block">
              <input type="radio" name="AAA6" value="1" title="允许">
              <input type="radio" name="AAA6" value="2" title="禁止" checked>
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label w120 tr red-star">注册审核</label>
            <div class="layui-input-block">
              <input type="radio" name="AAA7" value="1" title="开启">
              <input type="radio" name="AAA7" value="2" title="关闭" checked>
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label w120 tr red-star">注册验证</label>
            <div class="layui-input-inline">
              <select name="interest">
                <option value="0">无验证</option>
                <option value="1" selected>邮箱验证码验证</option>
                <option value="2">短信验证码验证</option>
              </select>
              <div class="red-star cgrey w700 mt10">若配置“邮件验证码验证” 则需要正确配置邮件配置 短信同理</div>
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label w120 tr red-star">找回密码</label>
            <div class="layui-input-block">
              <input type="radio" name="AAA8" value="1" title="允许">
              <input type="radio" name="AAA8" value="2" title="禁止" checked>
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label w120 tr"></label>
            <div class="layui-input-block">
              <button type="submit" class="layui-btn layui-bg-blue" lay-submit lay-filter="demo1">修改配置</button>
            </div>
          </div>
        </form>
      </div>
      <div class="layui-tab-item p50">
        <!--战队配置-->
        <form class="layui-form" action="">
          <div class="layui-form-item">
            <label class="layui-form-label w120 tr red-star">战队创建</label>
            <div class="layui-input-block">
              <input type="radio" name="AAA3" value="1" title="允许创建">
              <input type="radio" name="AAA3" value="2" title="禁止创建" checked>
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label w120 tr red-star">创建审核</label>
            <div class="layui-input-block">
              <input type="radio" name="AAA2" value="1" title="需要审核">
              <input type="radio" name="AAA2" value="2" title="无需审核" checked>
            </div>
            <div class="red-star cgrey">创建战队是否需要审核</div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label w120 tr red-star">战队解散</label>
            <div class="layui-input-block">
              <input type="radio" name="AAA4" value="1" title="允许解散">
              <input type="radio" name="AAA4" value="2" title="禁止解散" checked>
            </div>
            <div class="red-star cgrey">战队是否允许队长自行解散战队</div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label w120 tr red-star">战队更名</label>
            <div class="layui-input-block">
              <input type="radio" name="AAA6" value="1" title="允许更名">
              <input type="radio" name="AAA6" value="2" title="禁止更名" checked>
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label w120 tr red-star">限制人数</label>
            <div class="layui-input-block flex">
              <input type="number" name="AAA" value="" title="本地存储" class="layui-input w200">
              <span class="ml20 cgrey fs14">位 战队最大限制人数 "0"为不限制人数</span>
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label w120 tr"></label>
            <div class="layui-input-block">
              <button type="submit" class="layui-btn layui-bg-blue" lay-submit lay-filter="demo1">修改配置</button>
            </div>
          </div>
        </form>
      </div>
      <div class="layui-tab-item p50">
        <!--维护配置-->
        <form class="layui-form" action="">
          <div class="layui-form-item">
            <label class="layui-form-label w120 tr red-star">维护功能</label>
            <div class="layui-input-block">
              <input type="radio" name="AAA3" value="1" title="开启维护">
              <input type="radio" name="AAA3" value="2" title="关闭维护" checked>
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label w120 tr">维护公告</label>
            <div class="layui-input-block">
              <textarea id="edit"></textarea>
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label w120 tr"></label>
            <div class="layui-input-block">
              <button type="submit" class="layui-btn layui-bg-blue" lay-submit lay-filter="demo1">修改配置</button>
            </div>
          </div>
        </form>
      </div>
    </div>
  </div>
  <script>
    layui.use(function(){
      var form = layui.form;
      // 当表单元素被动态插入时，需主动进行组件渲染才能显示
      form.render(); // 渲染全部表单
      var element = layui.element;
      element.tabChange('your-tab-container-id', '0')

      var upload = layui.upload;
            
      //图片上传
      upload.render({
          elem: '#ID-upload-site' //绑定元素
          ,url: '/upload/' //改为你的图片上传接口
          ,size: 1024 //设置文件最大可上传大小，单位KB
          ,exts: 'jpg|png|gif' //设置可上传文件的扩展名
          ,done: function(res){
          //上传完毕回调
          if(res.code == 0){
              //假设返回的res.data是图片链接
              $('#demo-upload-img').append('<img src="'+ res.data +'" alt="上传成功" class="layui-upload-img">');
          }
          }
          ,error: function(){
          //请求出错的处理
          console.log('上传失败');
          }
      });
    })
    layui.extend({
        tinymce: '{/}./layui_exts/tinymce/tinymce'
    }).use(['tinymce'], function () {
        var t = layui.tinymce
        // code ...
        // 后面无特殊说明，其它代码均写在此处
        // ...
        t.render({
            elem: "#edit"  
            // 支持tinymce所有配置      
        },(opt, edit)=>{
            // 加载完成后回调 opt 是传入的所有参数
            // edit是当前编辑器实例，等同于t.get返回值
        });
    })
  </script>
</body>
</html>